<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ page import="net.tribal.comic.entities.User" %>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <title><g:message code="user.edit" default="EDIT USER" /></title>
    </head>
    <body>
    	<div class="nav">
            <span class="menuButton"><g:link class="create" action="create"><g:message code="user.new" default="NEW USER" /></g:link></span>
        </div>
        
        <h1><g:message code="user.edit" default="EDIT USER" /></h1>
        
<g:uploadForm>
	<div class="roundedCorners wrapper dialog">
		
		<g:hasErrors bean="${userInstance}"><div class="errors"><g:renderErrors bean="${userInstance}" as="list" /></div></g:hasErrors>
		
    	<table>
        	<tbody>
            	<tr class="prop">
                	<td valign="top" class="name">
                    	<label for="password"><g:message code="user.password" default="Password" />:</label>
                    </td>
                    <td valign="top" class="value ${hasErrors(bean: userInstance, field: 'password', 'errors')}">
                        <g:textField name="password"/>
                    </td>
                </tr>
                <tr class="prop">
                    <td valign="top" class="name">
                        <label for="repeatPassword"><g:message code="user.repeatPassword" default="REPEATPASSWORD" />:</label>
                    </td>
                    <td valign="top" class="value ${hasErrors(bean: userInstance, field: 'password', 'errors')}">
		            	<g:textField name="repeatPassword"/>
		        	</td>
		    	</tr>
			</tbody>
		</table>
		
		<div class="buttons">
            <span class="button"><g:actionSubmit class="show" action="show" value="${message(code: 'show', 'default': 'SHOW')}" /></span>
        	<span class="button"><g:actionSubmit class="save" action="updatePassword" value="${message(code: 'update.password', 'default': 'UPDATE PASSWORD')}" /></span>
    	</div>
	</div>
	
	<g:hiddenField name="id" value="${userInstance?.id}" />
	<g:hiddenField name="version" value="${userInstance?.version}" />
</g:uploadForm>

</body>
</html>